package com.shigen.demo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * user
 *
 * @author
 */
@ApiModel(value = "com.shigen.demo.entity.User")
@Data
@Accessors(chain = true)
public class User implements Serializable {
  @TableId
  private Integer id;

  private String password;

  /**
   * 是否删除，1为是，0为否
   */
  @ApiModelProperty(value = "是否删除，1为是，0为否")
  @TableLogic
  private Boolean isDel;

  /**
   * 创建时间
   */
  @ApiModelProperty(value = "创建时间")
  @TableField(fill = FieldFill.INSERT)
  private Date createTime;

  /**
   * 更新时间
   */
  @ApiModelProperty(value = "更新时间")
  @Version
  @TableField(fill = FieldFill.INSERT_UPDATE)
  private Date updateTime;

  private static final long serialVersionUID = 1L;
}
